package com.androidhelper.module.common.utils;

import android.content.Context;
import android.hardware.display.DisplayManager;
import android.view.Display;
import android.view.WindowManager;

import com.androidhelper.module.common.base.BaseApplication;

public class DualScreenUtils {


    //双屏显示
    DisplayManager mDisplayManager;//屏幕管理类
    public   void showDualSceen(Context context){
        Display[] displays;//屏幕数组
        mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);
        displays =mDisplayManager.getDisplays(); //得到显示器数组
        LogUtils.e("显示器数目"+displays.length);
         DifferentDislay mPresentation =new DifferentDislay (BaseApplication.getInstance().getApplicationContext(),displays[1]);//displays[1]是副屏
        mPresentation.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
          mPresentation.show();
    }
}
